<?php

	session_start();

	include "Global.php";

	$user= $_POST["username"];
	$psw= $_POST["password"];
	if( ValideAdmin( $user, $psw ) )
	{
		$_SESSION['admin'] = true;
		
		echo "<script language=\"javascript\" type=\"text/javascript\">";
		echo "window.location.replace(\"Admin/Admin.php\");";
		echo "</script>";
	}
	else
	{
		$_SESSION['admin'] = false;
		
		echo "<script language=\"javascript\" type=\"text/javascript\">";
		echo "window.location.replace(\"geopuebla.html\");";
		echo "</script>";
	}
?>
